#include "stack.h"
#include "queue.h"
#include "priority_queue.h"

void test1()
{
	wzw::stack<int> st1;
	st1.push(1);
	st1.push(2);
	st1.push(3);
	st1.push(4);
	st1.push(5);

	std::cout << st1.size() << std::endl;
	
	while (!st1.empty())
	{
		std::cout << st1.top() << " ";
		st1.pop();
	}
	
	std::cout << std::endl;
	std::cout << st1.size() << std::endl;

}

void test2()
{
	wzw::queue<int> q1;
	q1.push(1);
	q1.push(2);
	q1.push(3);
	q1.push(4);
	q1.push(5);

	std::cout << q1.size() << std::endl;

	while (!q1.empty())
	{
		std::cout << q1.front() << " ";
		//std::cout << q1.back() << " ";

		q1.pop();
	}

	std::cout << std::endl;
	std::cout << q1.size() << std::endl;
}

void test3()
{
	wzw::priority_queue<int, wzw::Great<int>> pq;
	pq.push(1);
	pq.push(5);
	pq.push(4);
	pq.push(3);
	pq.push(2);

	std::cout << pq.size() << std::endl;

	while (!pq.empty())
	{
		std::cout << pq.top() << " ";
		pq.pop();
	}
	std::cout << std::endl;

	std::cout << pq.size() << std::endl;


	int arr[] = { 1, 2, 3, 4, 6 };
	wzw::priority_queue<int, wzw::Great<int>> pq2(arr, arr + 5);

	std::cout << pq2.size() << std::endl;

	while (!pq2.empty())
	{
		std::cout << pq2.top() << " ";
		pq2.pop();
	}
	std::cout << std::endl;

	std::cout << pq2.size() << std::endl;
}

int main()
{
	//test1();
	//test2();
	test3();

	return 0;
}